package com.omo.types.excel;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Collection;

/**
 * excel导出实体
 * @param <T>
 */
@Data
public abstract class BaseExportExcelInfo<T> {

    public abstract BaseExportExcelEntity<T> buildExportExcelEntity(T data,Collection expandCollection,String suffix);

    public abstract Boolean setExpand(Boolean expand);



    @Data
    @Builder
    @NoArgsConstructor
    @AllArgsConstructor
    public static class BaseExportExcelEntity<T>{
        private String suffix; // 文件后缀
        private String templatePath; // 模板路径
        private BaseExportExcelData data; // 数据
        private Boolean expand; // 是否需要扩容
        private Collection expandCollection; // 扩容使用的参数 - title
        private Integer expandParam; // 扩容间隔
        private Integer expandBeginIndex; // 扩容开始索引
        private Integer expandBeginIndexASCii; // 扩容开始单元列ASCII码
    }
}
